<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
        <iframe name="frame01"></iframe>
        <iframe name="frame02"></iframe>
        <iframe name="frame03"></iframe>
        <script>
            //方式一
            window.frames['frame01'].document.write('frame01 text.');
            //方式二
            window.frames.frame02.document.write('frame02 text.');
            //方式三
            window.frames[2].document.write('frame03 text.');
            window.parent;//如果在框架中，获取父级窗口，否则返回自身引用
            window.parent.frames;//获取同级别的框架
           </script>
</body>
</html>